import hashlib

def deploy_model(model, deployment_path):
    """
    安全部署模型
    :param model: 模型参数
    :param deployment_path: 部署路径
    :return: 部署成功
    """
    model_hash = hashlib.sha256(model).hexdigest()
    with open(deployment_path, "wb") as f:
        f.write(model)
    return model_hash

# 示例
model = b"model_weights"
deployment_path = "deployed_model.bin"
model_hash = deploy_model(model, deployment_path)
print(f"Model deployed with hash: {model_hash}")